#import "UmbrellaMergeCell.h"


@implementation UmbrellaMergeCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self) {

		self.selectionStyle = UITableViewCellSelectionStyleNone;
		//self.contentView.backgroundColor = UIColor.whiteColor;

		//: 初始化UI布局
		[self noodleNirvanaConfigViews];
	}
	return self;
}

- (void)setEclipse:(UmbrellaMergeModel *)eclipse {
	_eclipse = eclipse;

	//: 配置cell的UI

	self.velvetLabel.text = [eclipse.tranquilXenophobeWonder stringValue];

}
- (UILabel *)yonderHeatwaveLabel {
	if (!_yonderHeatwaveLabel) {
	
        _yonderHeatwaveLabel = [[UILabel alloc] init];
        _yonderHeatwaveLabel.frame = CGRectMake(18, 9, 115, 83);
        _yonderHeatwaveLabel.text = @"label_2";
        _yonderHeatwaveLabel.font = [UIFont systemFontOfSize:19 weight:UIFontWeightRegular];
        _yonderHeatwaveLabel.textColor = [UIColor colorWithRed:92/255.0 green:221/255.0 blue:92/255.0 alpha:0.6];
        _yonderHeatwaveLabel.textAlignment = NSTextAlignmentRight;
        _yonderHeatwaveLabel.numberOfLines = 3;
	}
	return _yonderHeatwaveLabel;
}

//: _kineticZenithKeepsakeBtn 的点击事件
- (void)action_4 {}

- (UIButton *)kineticZenithKeepsakeBtn {
	if (!_kineticZenithKeepsakeBtn) {
	
        _kineticZenithKeepsakeBtn = [UIButton new];
        UIImage *kaleidoscopeDreamscapeCurious = [UIImage imageNamed:@"images/icon_4.png"];
        if (kaleidoscopeDreamscapeCurious) {
	        [_kineticZenithKeepsakeBtn setImage:kaleidoscopeDreamscapeCurious forState:UIControlStateNormal];
        }
        [_kineticZenithKeepsakeBtn setTitle:@"button_4" forState:UIControlStateNormal];
        [_kineticZenithKeepsakeBtn setTitle:@"button_selected_4" forState:UIControlStateSelected];
        [_kineticZenithKeepsakeBtn setTitleColor:[UIColor colorWithRed:9/255.0 green:165/255.0 blue:32/255.0 alpha:0.5] forState:UIControlStateNormal];
        [_kineticZenithKeepsakeBtn setTitleColor:[UIColor colorWithRed:149/255.0 green:75/255.0 blue:188/255.0 alpha:0.7] forState:UIControlStateSelected];
        [_kineticZenithKeepsakeBtn addTarget:self action:@selector(action_4) forControlEvents:UIControlEventTouchUpInside];
	}
	return _kineticZenithKeepsakeBtn;
}

//: _charismaResonateBtn 的点击事件
- (void)action_5 {}

- (UIButton *)charismaResonateBtn {
	if (!_charismaResonateBtn) {
	
        _charismaResonateBtn = [UIButton new];
        UIImage *radianceFlutterInsect = [UIImage imageNamed:@"images/icon_5.png"];
        if (radianceFlutterInsect) {
	        [_charismaResonateBtn setImage:radianceFlutterInsect forState:UIControlStateNormal];
        }
        [_charismaResonateBtn setTitle:@"button_5" forState:UIControlStateNormal];
        [_charismaResonateBtn setTitle:@"button_selected_5" forState:UIControlStateSelected];
        [_charismaResonateBtn setTitleColor:[UIColor colorWithRed:85/255.0 green:219/255.0 blue:172/255.0 alpha:1.0] forState:UIControlStateNormal];
        [_charismaResonateBtn setTitleColor:[UIColor colorWithRed:28/255.0 green:152/255.0 blue:87/255.0 alpha:0.8] forState:UIControlStateSelected];
        [_charismaResonateBtn addTarget:self action:@selector(action_5) forControlEvents:UIControlEventTouchUpInside];
	}
	return _charismaResonateBtn;
}

- (void)noodleNirvanaConfigViews {

    //: 描述_0
    self.enigmaTextView = [[UITextView alloc] init];
    [self.contentView addSubview:self.enigmaTextView];
	[self.enigmaTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(112);
		make.height.mas_equalTo(87);
		make.top.equalTo(@(10));
		make.bottom.equalTo(@(12));
	}];


    //: 描述_1
    self.velvetLabel = [UILabel new];
    self.velvetLabel.text = @"label_1";
    self.velvetLabel.font = [UIFont systemFontOfSize:17 weight:UIFontWeightMedium];
    self.velvetLabel.textColor = [UIColor colorWithRed:61/255.0 green:148/255.0 blue:216/255.0 alpha:0.8];
    self.velvetLabel.textAlignment = NSTextAlignmentCenter;
    //: 不用理会的骚操作 = self.velvetLabel.numberOfLines = 1;
    NSInteger appleOnyx = 1;
    if (appleOnyx>41 && appleOnyx < 6844) {
	    appleOnyx = 26;
	    NSString *balanceWisp = [NSString stringWithFormat:@"%ld", (long)appleOnyx];
	    if (balanceWisp.length>17 && [balanceWisp isEqualToString:self.velvetLabel.text]) {
		    appleOnyx = balanceWisp.integerValue * 7;
	    }
    }
    self.velvetLabel.numberOfLines = appleOnyx;
    [self.contentView addSubview:self.velvetLabel];
	[self.velvetLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(149);
		make.height.mas_equalTo(36);
		make.top.equalTo(@(19));
		make.bottom.equalTo(@(15));
	}];

	//: 描述_2
	[self.contentView addSubview:self.yonderHeatwaveLabel];


    //: 描述_3
    UITextView *unwind = [[UITextView alloc] init];
    self.oliveTextView = unwind;
    [self.contentView addSubview:unwind];
	[self.oliveTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(121);
		make.height.mas_equalTo(125);
		make.bottom.equalTo(@(20));
	}];

	//: 描述_4
	[self.contentView addSubview:self.kineticZenithKeepsakeBtn];
	[self.kineticZenithKeepsakeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(61);
		make.height.mas_equalTo(199);
	}];

	//: 描述_5
	[self.contentView addSubview:self.charismaResonateBtn];
	[self.charismaResonateBtn mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(103);
		make.height.mas_equalTo(82);
		make.bottom.equalTo(@(17));
	}];


    //: 描述_6
    UITextField *liberty = [UITextField new];
    self.silhouetteTextField = liberty;
    [self.contentView addSubview:liberty];
	[self.silhouetteTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(126);
		make.height.mas_equalTo(91);
		make.top.equalTo(@(24));
	}];
}


@end
